import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

public class HJ59 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        if(s.length() ==0 || s == null){
            System.out.println(-1);
        }
        LinkedHashMap<Character,Integer> map = new LinkedHashMap<>();
        //HashMap<Character,Integer> map = new HashMap<>();
        char[] chars = s.toCharArray();
        for (char aChar : chars) {
            Integer integer = map.get(aChar);
            if(integer == null)
                integer =0;
            map.put(aChar,++integer);
        }
        int i = 0;
        Set<Map.Entry<Character, Integer>> entries = map.entrySet();
        for (Map.Entry<Character, Integer> entry : entries) {
            if(entry.getValue() == 1){
                System.out.println(entry.getKey());
                i++;
                break;
            }
        }
        if(i!=1){
            System.out.println(-1);
        }
    }
}
